﻿using App_Clinique.ClassLibrary.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace App_Clinique.ClassLibrary.Classes
{
    public class Singleton
    {
        public Singleton()
        {
            this.Actualites = new List<Actualite>();
            this.Consultations = new List<Consultation>();
            this.ArretsMaladie = new List<ArretMaladie>();
            this.DossierMedicaux = new List<DossierMedical>();
            this.OperationsChirurgicales = new List<OperationChirurgicale>();
            this.Ordonnances = new List<Ordonnance>();
            this.Medicaments = new List<Medicament>();
            this._OrdonnancesMedicaments = new List<OrdonnancesMedicaments>();
            this.Patients = new List<Patient>();
        }

        private static Singleton _current;
        public static Singleton Current
        {
            get
            {
                if (_current == null)
                {
                    _current = new Singleton();
                }
                return _current;
            }
        }

        public Boolean EstIdentife { get; set; }
        public Identification MesIdentifiants { get; set; }

        public List<Actualite> Actualites { get; set; }
        public List<Consultation> Consultations { get; set; }
        public List<Consultation> ConsultationsDeLaSemaine { get; set; }
        public List<ArretMaladie> ArretsMaladie { get; set; }
        public List<DossierMedical> DossierMedicaux { get; set; }
        public List<OperationChirurgicale> OperationsChirurgicales { get; set; }
        public List<Ordonnance> Ordonnances { get; set; }
        public List<Medicament> Medicaments { get; set; }
        public List<OrdonnancesMedicaments> _OrdonnancesMedicaments { get; set; }
        public List<Patient> Patients { get; set; }

        // Mode
        public enum Mode
        {
            Nouveau,
            Modifier,
            Supprimer,
            Consultation
        }

        public Mode ModeCourant { get; set; }
    }
}
